import { Shop } from "@prisma/client";
import { BaseEntity } from "./baseEntity";
import { Field, Int, ObjectType } from "@nestjs/graphql";
import { GoodsEntity } from "./goods.entity";


@ObjectType()
export class ShopEntity extends BaseEntity implements Shop {
    @Field()
    hash_key: string;
    
    @Field()
    name: string;//店铺名

    @Field(() => Int)
    start: number;//收藏数

    @Field(() => Int)
    count: number;//销售数

    @Field(() => Int)
    threshold: number;//起送费

    @Field(() => Int)
    total: number;//配送费

    @Field()
    information: string;//介绍

    @Field()
    address: string;//地址

    @Field()
    phone: string;//phone

    @Field()
    businessHours: string;//营业时间

    @Field(() => [GoodsEntity], { nullable: true })
    Goods?: GoodsEntity[]
}